package com.yl.pattern.creatormodel.factory.factory_method;

/**
 * @Author 小羊
 * @Date 29/10/2024下午 8:21
 * @ClassName Client
 * @Description Client
 */
public class Client {
    public static void main(String[] args) {
        //1、创建咖啡店类
        CoffeeStore store = new CoffeeStore();
        //2、点咖啡
        CoffeeFactory factory = new AmericanFactory();
        store.setFactory(factory);
        Coffee coffee = store.orderCoffee();
        System.out.println(coffee.getName());
    }
}
